package com.zyzg.mapper;

import com.alibaba.fastjson2.JSONObject;
import com.zyzg.domain.GpsDistrict;
import com.zyzg.domain.GpsReal;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.concurrent.LinkedBlockingQueue;

/**
 * @Author: lurui
 * @CreateTime: 2021-03-26 11:57
 * @Description: ${Description}
 */
public interface DataMapper {


    List<JSONObject> getCarConfigList();


    List<GpsReal> getRealGpsData();

    int insertGpsReal(GpsReal gpsReal);

    int updateGpsReal(GpsReal gpsReal);

    int insertGpsDistrict(GpsDistrict gpsDistrict);

    void updateGpsDistrict(GpsDistrict gpsDistrict);

    int insertCarHistoryFlag(@Param("configId") int configId,@Param("currentDay")Date currentDay, @Param("flag") int flag);

    int updateCarOnlineStatus(@Param("configId")int configId, @Param("isOnline") int isOnline, @Param("onlineTime") Date date);

    int updateRealGpsOnlineTime(@Param("configId")int configId, @Param("date")Date date);

    int updateRealGpsOnlineLastTime(@Param("configId")int configId, @Param("date")Date date);

    int saveAll(List<GpsReal> gpsRealList);

    int saveDistrictAll(List<GpsDistrict> gpsDistrictList);

    int saveRealAll(List<GpsReal> gpsRealList);

    void saveRealOtherAll(List<GpsReal> gpsRealList);

    JSONObject getPositionInfo(String cacheKey);

    int savePositionInfo(@Param("cacheKey")String cacheKey, @Param("positionJson")String positionJson);
}
